#include <stdio.h>
#include <math.h>

int
main(int argc, char *argv[])
{
	double limit = 1000; // work on numbers below this one
	double i;
	double multip_sum = 0; // sum of multiples

	for( i = 1; i < limit; i++ ) {
		if( fmod(i, 3) == 0 || fmod(i, 5) == 0 ) {
			multip_sum += i;
		}
	}

	printf("%f\n", multip_sum);

	return 0;
}
